
(defvar c-mode-abbrev-table nil "\
Abbrev table in use in C-mode buffers.")

(define-abbrev-table (quote c-mode-abbrev-table) nil)

(defvar c-mode-map nil "\
Keymap used in C mode.")

(if c-mode-map nil (setq c-mode-map (make-sparse-keymap)) (define-key c-mode-map "{" (quote electric-c-brace)) (define-key c-mode-map "}" (quote electric-c-brace)) (define-key c-mode-map ";" (quote electric-c-semi)) (define-key c-mode-map ":" (quote electric-c-terminator)) (define-key c-mode-map "" (quote mark-c-function)) (define-key c-mode-map "" (quote indent-c-exp)) (define-key c-mode-map "" (quote backward-delete-char-untabify)) (define-key c-mode-map "	" (quote c-indent-command)))

(defvar c-mode-syntax-table nil "\
Syntax table in use in C-mode buffers.")

(if c-mode-syntax-table nil (setq c-mode-syntax-table (make-syntax-table)) (modify-syntax-entry 92 "\\" c-mode-syntax-table) (modify-syntax-entry 47 ". 14" c-mode-syntax-table) (modify-syntax-entry 42 ". 23" c-mode-syntax-table) (modify-syntax-entry 43 "." c-mode-syntax-table) (modify-syntax-entry 45 "." c-mode-syntax-table) (modify-syntax-entry 61 "." c-mode-syntax-table) (modify-syntax-entry 37 "." c-mode-syntax-table) (modify-syntax-entry 60 "." c-mode-syntax-table) (modify-syntax-entry 62 "." c-mode-syntax-table) (modify-syntax-entry 38 "." c-mode-syntax-table) (modify-syntax-entry 124 "." c-mode-syntax-table) (modify-syntax-entry 39 "\"" c-mode-syntax-table))

(defconst c-indent-level 2 "\
*Indentation of C statements with respect to containing block.")

(defconst c-brace-imaginary-offset 0 "\
*Imagined indentation of a C open brace that actually follows a statement.")

(defconst c-brace-offset 0 "\
*Extra indentation for braces, compared with other text in same context.")

(defconst c-argdecl-indent 5 "\
*Indentation level of declarations of C function arguments.")

(defconst c-label-offset -2 "\
*Offset of C label lines and case statements relative to usual indentation.")

(defconst c-continued-statement-offset 2 "\
*Extra indent for lines not starting new statements.")

(defconst c-auto-newline nil "\
*Non-nil means automatically newline before and after braces,
and after colons and semicolons, inserted in C code.")

(defconst c-tab-always-indent t "\
*Non-nil means TAB in C mode should always reindent the current line,
regardless of where in the line point is when the TAB command is used.")

(defun c-mode nil "\
Major mode for editing C code.
Expression and list commands understand all C brackets.
Tab indents for C code.
Comments are delimited with /* ... */.
Paragraphs are separated by blank lines only.
Delete converts tabs to spaces as it moves back.
\\{c-mode-map}
Variables controlling indentation style:
 c-tab-always-indent
    Non-nil means TAB in C mode should always reindent the current line,
    regardless of where in the line point is when the TAB command is used.
 c-auto-newline
    Non-nil means automatically newline before and after braces,
    and after colons and semicolons, inserted in C code.
 c-indent-level
    Indentation of C statements within surrounding block.
    The surrounding block's indentation is the indentation
    of the line on which the open-brace appears.
 c-continued-statement-offset
    Extra indentation given to a substatement, such as the
    then-clause of an if or body of a while.
 c-brace-offset
    Extra indentation for line if it starts with an open brace.
 c-brace-imaginary-offset
    An open brace following other text is treated as if it were
    this far to the right of the start of its line.
 c-argdecl-indent
    Indentation level of declarations of C function arguments.
 c-label-offset
    Extra indentation for line that is a label, or case or default.

Settings for K&R and BSD indentation styles are
  c-indent-level                5    8
  c-continued-statement-offset  5    8
  c-brace-offset               -5   -8
  c-argdecl-indent              0    8
  c-label-offset               -5   -8

Turning on C mode calls the value of the variable c-mode-hook with no args,
if that value is non-nil." (interactive) (byte-code "҈� ��!�Չ�։����!���!��P����!�����!�ډ	���!�ˉ
���!�ۉ���!�܉���!�݉���!�މ���!�߉���!�ˉ���!�" [c-mode-map major-mode mode-name local-abbrev-table c-mode-abbrev-table c-mode-syntax-table paragraph-start page-delimiter paragraph-separate indent-line-function require-final-newline t comment-start comment-end comment-column comment-start-skip comment-indent-hook parse-sexp-ignore-comments nil kill-all-local-variables use-local-map c-mode "C" set-syntax-table make-local-variable "^$\\|" c-indent-line "/* " " */" 32 "/\\*+ *" c-comment-indent run-hooks c-mode-hook] 15))

(defun c-comment-indent nil (byte-code "��!�
 Â ���!�iT])�" [comment-column looking-at "^/\\*" 0 skip-chars-backward " 	"] 4))

(defun electric-c-brace (arg) "\
Insert character and correct line's indentation." (interactive "P") (byte-code "Ĉ�	?�& l�& ���!�n)�& 
�% � �� �Â& ąK c�� �
�= `S��� �� ���F Tb���!)��] �b���	!!)�b ��	!!)�" [insertpos arg c-auto-newline t nil last-command-char skip-chars-backward " 	" c-indent-line newline delete-char -1 self-insert-command prefix-numeric-value] 12))

(defun electric-c-semi (arg) "\
Insert character and correct line's indentation." (interactive "P") (byte-code "� �	!� ��	!!�" [c-auto-newline arg nil electric-c-terminator self-insert-command prefix-numeric-value] 4))

(defun electric-c-terminator (arg) "\
Insert character and correct line's indentation." (interactive "P") (byte-code "ƈ�`
?�P l�P �� ���!�g�U�N �=�3 ��!?�3 ���!�`	X)�N � ��`	\"�8�M �8�M �8))?�{ c�� ��m � ?�m `S��� �� ���v Tb���!)��� �b���
!!)�� ��
!!*�" [insertpos end arg last-command-char pps c-auto-newline nil beginning-of-line skip-chars-forward " 	" 35 58 looking-at "case" forward-word 2 beginning-of-defun parse-partial-sexp 3 4 5 c-indent-line c-inside-parens-p newline delete-char -1 self-insert-command prefix-numeric-value] 16))

(defun c-inside-parens-p nil (byte-code "���" [nil (byte-code "���`� �`\"�db��`��#� ef�U))�" [narrow-to-region beginning-of-defun scan-lists -1 1 40] 6) ((error (byte-code "��" [nil] 1)))] 3))

(defun c-indent-command (&optional whole-exp) (interactive "P") (byte-code "ňƈ�? � ���� � �`����!�`��
b���!�`�)�
V�; �
	�$+�V ?�L ���!�n?)�T � �V � �" [whole-exp shift-amt beg end c-tab-always-indent nil "Indent current line as C code, or in some cases insert a tab character.
If c-tab-always-indent is non-nil (the default), always indent current line.
Otherwise, indent the current line only if point is at the left margin
or in the line's indentation; otherwise insert a tab.

A numeric argument, regardless of its value,
means indent rigidly all the lines of the expression starting after point
so that this line becomes properly indented.
The relative indentation among the lines of the expression are preserved." c-indent-line beginning-of-line forward-sexp 1 forward-line indent-code-rigidly "#" skip-chars-backward " 	" insert-tab] 9))

(defun c-indent-line nil "\
Indent current line as C code.
Return the amount the indentation changed by." (byte-code "��!���d`Z� �`���=�\" � ��� �=�/ � ��� ��!�; Љ�� ��!�<�H @����!�^ ��!�^ ���!���!)�l �\\]��� ��!�v ��!?�� �� �� )��� g�U�� Z��� g�U�� 	\\����!�iZ���!�� dZ`V�� dZb�� �
`\"�j�dZ`V�� dZb�-�" [indent nil beg shift-amt case-fold-search pos t c-label-offset c-indent-level c-brace-offset calculate-c-indent beginning-of-line current-indentation calculate-c-indent-within-comment looking-at "[ 	]*#" 0 skip-chars-forward " 	" "case\\b" "[A-Za-z]" forward-sexp 1 ":" "else\\b" "else\\s_" c-backward-to-start-of-if 125 123 zerop delete-region] 19))

(defun calculate-c-indent (&optional parse-start) "\
Return appropriate indentation for current line as C code.
In usual case returns an integer: the column to indent to.
Returns nil if line starts inside a string, t if in a comment." (byte-code "�� �`���� b� � �`W�3 `���`�#��A@��� ��8�= �8�F �8��?�� b���!�g�U�\\ ҂� ��b e!������#���!�� ��!�� ��!Sb���!�`W�� g�>?�� �� �)o�� h�>�� ҂� \\)���f�\"�� Tb�i��b��!�h�=�� h�=�� `�Zf�=�� �`�Zf!�>�� h�=�� �!�� ��!��� �h�>?��!�i\\��b����!��
��!���!�Pg�U�-��!�Lg�U�?��!�����#�L�� �`�
)���!���`W�g
`V�f� Z�gi))���n�u�!��\\����!�n��҂�h�=����!�� #,)�" [indent-point case-fold-search nil state containing-sexp parse-start basic-indent c-argdecl-indent c-continued-statement-offset t colon-line-end c-label-offset c-indent-level c-brace-offset c-brace-imaginary-offset beginning-of-line beginning-of-defun parse-partial-sexp 0 3 4 skip-chars-forward " 	" 123 c-backward-to-noncomment re-search-backward "^[^ 	
#]" move looking-at "\\sw\\|\\s_" ".*(" match-end forward-sexp 1 (44 59) (41 59 125) /= 44 58 2 39 char-syntax (119 95) c-backward-to-start-of-continued-exp (nil 44 59 125 123) forward-char " 	
" "#\\|/\\*\\|case[ 	
].*:\\|[a-zA-Z0-9_$]*:" 35 forward-line 47 search-forward "*/" end-of-line ":" current-indentation + zerop skip-chars-backward 41 -1] 34))

(defun calculate-c-indent-within-comment nil "\
Return the indentation amount for line, assuming that
the current line is to be regarded as part of a block comment." (byte-code "���� ���!�g�U����!�`��� ���!����#�2 	�2 ��!Tb�i)*�" [end star-start t nil beginning-of-line skip-chars-forward " 	" 42 skip-chars-backward " 	
" re-search-forward "/\\*[ 	]*" match-beginning 0] 9))

(defun c-backward-to-noncomment (lim) (byte-code "��	?�M ��
\"�`��`�
\\Y�# ���!���!)�. ��
�#�I � ���!���!�C `
X��I É�b�� *�" [opoint stop lim t nil skip-chars-backward " 	
" 2 forward-char -2 looking-at "\\*/" search-backward "/*" move beginning-of-line skip-chars-forward " 	" "#"] 10))

(defun c-backward-to-start-of-continued-exp (lim) (byte-code "h�U�	 ��!�� �`X� Tb���!�" [lim 41 forward-sexp -1 beginning-of-line skip-chars-forward " 	"] 4))

(defun c-backward-to-start-of-if (&optional limit) "\
Move to the start of the last ``unbalanced'' if." (byte-code "� �� �`)�����	!?�F ��!���!�) 	T��B ��!�6 	S��B `W�B ˉ�b�� *�" [limit if-level case-fold-search nil beginning-of-defun 1 zerop backward-sexp looking-at "else\\b" "if\\b" 0] 8))

(defun mark-c-function nil "\
Put mark at end of C function, point at beginning." (interactive) (byte-code "���`!�� ��`!�� �� �" [nil push-mark end-of-defun beginning-of-defun backward-paragraph] 6))

(defun indent-c-exp nil "\
Indent each line of the C grouping following point." (interactive) (byte-code "���C`C���������`�
	���!)�����m?�8 ?������?�T m�S Љ?�� ���`� �`��%��@��AA@�� AA@�Y�� AA@�
��8�� � ��8�� ��!�� Љ��F ��X�� Љ��� ���\"�� ��
�V�� A
AS���� �W��B�
BT���� �
@?��
A@����!�`)\"���!���!�l�+��@�4@�Y���
@f�\"�H@�	�����!���!�h�>?�k�
@!�i\\�	���}�!�� �	��@�	)���@��@[!��	\")���!����!�����!���!)���	\\]�	�g�U��	Z�	�g�U��	\\�	�i	U��g�U���`� �`\"�	j��!���� �`)�#�� �� ��1 ).�" [indent-stack nil contain-stack case-fold-search restart outer-loop-done inner-loop-done state ostate this-indent last-sexp at-else opoint next-depth last-depth innerloop-done t c-continued-statement-offset val c-label-offset c-indent-level c-brace-offset comment-start-skip 0 forward-sexp 1 parse-partial-sexp end-of-line 4 c-indent-line 3 forward-line /= setcar -1 skip-chars-forward " 	" 123 looking-at "else\\W" c-backward-to-noncomment (nil 44 59 125 58 123) c-backward-to-start-of-continued-exp c-backward-to-start-of-if current-indentation calculate-c-indent "case[ 	]" "[A-Za-z]" ":" 125 35 delete-region beginning-of-line re-search-forward indent-for-comment] 31))
